usb: gadget: f_dfu: Add get_alt function to pass the USB compliance test
authorStefan Roese <[email protected]>
Fri, 9 Jan 2015 13:54:56 +0000 (14:54 +0100)
committerMarek Vasut <[email protected]>
Sun, 18 Jan 2015 11:31:00 +0000 (12:31 +0100)
commit1fd81b7c23705eb46fd80d1eccb68fa8697cf348
treecb1d853520ca34b700e89742381f2f483150a4be
parent87ed6b1067a8b8cf2bf3fd900080164cef8e0b77
usb: gadget: f_dfu: Add get_alt function to pass the USB compliance test

Without this function the USB compliance test (USB 2.0 Command Verifier) will
fail in the "Interface Descriptor Test" with this error message:

FAIL
(1.2.51) A successful GetInterface request must return the alternate setting
set by a prior call to SetInterface.

Lets add this function to read back the value so that the DFU device fully
passes the USB compliance test.

Signed-off-by: Stefan Roese <[email protected]>
Cc: Roger Meier <[email protected]>
Cc: Samuel Egli <[email protected]>
Cc: Enrico Leto <[email protected]>
Acked-by: Heiko Schocher <[email protected]>
Cc: Lukasz Majewski <[email protected]>
Cc: Marek Vasut <[email protected]>
drivers/usb/gadget/f_dfu.c